<script>
import Taro from "@tarojs/taro";
import { getTokenInfo } from "@/utils/storage";
/**
 * 为了兼容旧版小程序，添加login/login中转页面
 */
export default {
  name: "LoginOld",
  setup() {
    const { refreshToken } = getTokenInfo() || {};
    let url = "/pages/home/index";
    if (!refreshToken) {
      url = "/pages/login/index";
    }
    Taro.reLaunch({ url });
    //兼容旧版小程序
    return () => <tz-view></tz-view>;
  },
};
</script>

<style lang="scss"></style>
